import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import store from "./store/index.js";
import router  from './router';
import plugins from './plugins';
import SvgIcon from "./components/SvgIcon/index.vue";
import './style.css'
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import "./assets/styles/element-ui.scss";
import '@/assets/styles/index.scss' // global css
// import Cookies from "js-cookie";
// import ElementPlus from "element-plus";
// import locale from "element-plus/es/locale/lang/zh-cn";
import {
  parseTime,
  resetForm,
  addDateRange,
  handleTree,
  selectDictLabel,
  selectDictLabels,
} from "@/utils/ruoyi";
const app=createApp(App);
// 全局方法挂载
app.config.globalProperties.parseTime = parseTime;
app.config.globalProperties.resetForm = resetForm;
app.config.globalProperties.handleTree = handleTree;
app.config.globalProperties.addDateRange = addDateRange;
app.config.globalProperties.selectDictLabel = selectDictLabel;
app.config.globalProperties.selectDictLabels = selectDictLabels;
app.use(store);
app.use(router);
app.use(plugins);
app.use(ElementPlus);
app.component("svg-icon", SvgIcon);
// 使用element-plus 并且设置全局的大小
// app.use(ElementPlus, {
//   locale: locale,
//   // 支持 large、default、small
//   size: Cookies.get('size') || 'default'
// })
app.mount('#app')
